#!/usr/bin/env node

const stdin = process.stdin,
      stdout = process.stdout,
      Transform = require('stream').Transform,
      chalk = require('chalk');

stdin.setEncoding('utf8');

class Mytransform extends Transform{
  constructor() {
    super();
  }
  _transform = (chunk,encoding,callback) => {
    this.push(chalk.greenBright(chunk.toString('utf8')));
    callback();
  }
}

let myt = new Mytransform();
stdin.pipe(myt).pipe(stdout);
